//
//  TTDiskCache.h
//  Tint
//
//  Created by Kevin Wu on 2/23/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TTCache.h"


@interface TTDiskCache : TTCache {
    NSMutableDictionary *_cacheDictionary;
    NSString *_profileKey;
}


- (NSString *)stringForKey:(NSString *)key;
- (void)setString:(NSString *)string forKey:(NSString *)key;
- (void)setString:(NSString *)string forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (UIImage *)imageForKey:(NSString *)key;
- (void)setImage:(UIImage *)image forKey:(NSString *)key;
- (void)setImage:(UIImage *)image forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (NSData *)dataForKey:(NSString *)key;
- (void)setData:(NSData *)data forKey:(NSString *)key;
- (void)setData:(NSData *)data forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (void)copyFileAtPath:(NSString *)filePath asKey:(NSString *)key;
- (void)copyFileAtPath:(NSString *)filePath asKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (void)moveFileAtPath:(NSString *)filePath asKey:(NSString *)key;
- (void)moveFileAtPath:(NSString *)filePath asKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (NSString *)cachePathForKey:(NSString *)key;
- (NSString *)cacheDirectory;
+ (CGFloat)diskCacheSize; // in Mega byte
+ (NSArray *)allCacheTypes;
- (CGFloat)totalSize; // in Mega byte
- (NSDate *)dateOfKey:(NSString *)key;

@end
